//
//  PromptDialog.h
//  BayMaxPuzzle
//
//  Created by Jacky on 15/4/3.
//
//

#ifndef __BayMaxPuzzle__PromptDialog__
#define __BayMaxPuzzle__PromptDialog__

#include "cocos2d.h"

USING_NS_CC;

enum DialogEntry{
    RETURN,
    RESTART
};

const Color3B yes_color = Color3B(0,191,255);
const Color3B no_color = Color3B(255,160,122);

class PromptDialog : public cocos2d::LayerColor
{
public:
    // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
    virtual bool init(DialogEntry dialogentry);
    
    // implement the "static create()" method manually
    static PromptDialog* create(DialogEntry dialogentry);
    
    void initTouchEventlistener();
    void initButtons();
    
    void destroy();
        
private:
    
    DialogEntry _dialogEntry;
    
    void onButtonYES();
    void onButtonNO();
};

#endif /* defined(__BayMaxPuzzle__PromptDialog__) */
